﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Smart.Navigation;

namespace NavigationSampleApp.Views
{
    /// <summary>
    /// 
    /// </summary>
    [View(ViewId.Menu)]
    public partial class MenuView : AppViewBase
    {
        /// <summary>
        /// 
        /// </summary>
        public MenuView()
        {
            InitializeComponent();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="args"></param>
        public override void OnViewOpen(ViewForwardEventArgs args)
        {
            FormControl.SetTitle( "メニュー" );
            FormControl.SetButtonLeft( "終了" );
            FormControl.SetButtonRight( null );
        }

        /// <summary>
        /// 
        /// </summary>
        public override void OnButtonLeft()
        {
            Navigator.Exit();
        }

        /// <summary>
        /// 
        /// </summary>
        public override void OnButtonRight()
        {
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnMenu1_Click(object sender, EventArgs e)
        {
            Navigator.Forward( ViewId.ContextInput1 );
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnMenu2_Click(object sender, EventArgs e)
        {
            Navigator.Forward( ViewId.Stack1 );
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnMenu3_Click(object sender, EventArgs e)
        {
            Navigator.Forward( ViewId.DataList );
        }
    }
}
